﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BehaviorTree
{
    public class SequenceNode : BaseNode
    {
        public override Node_Status tick(float frameTime)
        {
            for (int i = 0; i < childs.Length; i++)
            {
                if (childs[i].tick(frameTime) == Node_Status.Fail)
                    return Node_Status.Fail;
            }
            return Node_Status.Success;
        }

    }

}
